<?php

namespace Modules\Admin\Http\Controllers\Ebooks;

use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
use Modules\Common\General\Security\Api\Gateway;
use Modules\Common\Models\AdminLog;
use Modules\Common\Models\Ebooks;
use Modules\Common\Models\OrderDetails;
use Modules\Common\Models\UserBehavior;
use Modules\Common\Models\UserBookmarks;
use Modules\Common\Models\UserFavorites;
use Modules\Common\Models\UserNotes;
use Modules\Common\Models\UserReadingRecords;
use Modules\Common\Models\UserRecommendations;
use Modules\Common\Models\UserReviews;
use Modules\Common\Util\Api;
use Modules\Common\Models\Helpers\TrashManager;
use Modules\Common\Util\Database;
use Modules\Common\Exceptions\Base\Exception;


class Details
{
     /**
     * @Route(path=/api/admin/ebook-details)
     */
    public function index()
    {
        $ebook = Ebooks::with(['category', 'adminUser'])->find(request('id'));
        return Api::success($ebook);
    }

}